package com.kuang.pojo;

import org.springframework.beans.factory.annotation.Value;

/**
 * @program: springs-study
 * @description:
 * @author: 陈恩涛
 * @create: 2020-07-09 06:48
 **/
//这个注解的意思就是说明这个类被Spring接管了，注册到了容器中

public class User {

    @Value("小宝")//属性注入值
    private String name;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Override
    public String toString() {
        return "User{" +
                "name='" + name + '\'' +
                '}';
    }
}
